package cn.gson.school.entity.jiaoxue;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 教学模块--荣誉表
 * 荣誉表id；所获荣誉；获奖时间；项目id；团队id；获奖感言
 */
@Entity
@Table(name = "tb_jx_honor")
public class HonorEntity {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="honor_id")
	private Long honorId;
	
	@Column(name="honor_name")
	private String honorName;
	
	@Column(name="honor_time")
	@JsonFormat(pattern="yyyy-MM-ddHH:mm:ss")
	private Date winnTime;
	
	@ManyToOne
	@JoinColumn(name="project_id")
	private ProjectEntity projectId;/**项目管理外键id*/
	
	@OneToOne
	@JoinColumn(name="team_id")
	private TeamEntity teamId;/**团队表外键id*/
	
	@Column(name="honor_speech")
	private String acceptanceSpeech;//获奖感言

	@Column(name = "is_delete")
	private Integer delete;

	public Integer getDelete() {
		return delete;
	}

	public void setDelete(Integer delete) {
		this.delete = delete;
	}
	
	public Long getHonorId() {
		return honorId;
	}

	public void setHonorId(Long honorId) {
		this.honorId = honorId;
	}

	public String getHonorName() {
		return honorName;
	}

	public void setHonorName(String honorName) {
		this.honorName = honorName;
	}

	public Date getWinnTime() {
		return winnTime;
	}

	public void setWinnTime(Date winnTime) {
		this.winnTime = winnTime;
	}

	public ProjectEntity getProjectId() {
		return projectId;
	}

	public void setProjectId(ProjectEntity projectId) {
		this.projectId = projectId;
	}

	public TeamEntity getTeamId() {
		return teamId;
	}

	public void setTeamId(TeamEntity teamId) {
		this.teamId = teamId;
	}

	public String getAcceptanceSpeech() {
		return acceptanceSpeech;
	}

	public void setAcceptanceSpeech(String acceptanceSpeech) {
		this.acceptanceSpeech = acceptanceSpeech;
	}

	@Override
	public String toString() {
		return "HonorEntity [honorId=" + honorId + ", honorName=" + honorName + ", winnTime=" + winnTime
				+ ", projectId=" + projectId + ", teamId=" + teamId + ", acceptanceSpeech=" + acceptanceSpeech
				+ ", delete=" + delete + "]";
	}
}
